package org.raymond.iworks.study.basic.designpattern.composite;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public class Client {
    public static void main(String[] args) {
        OrganizationComponent university = new University("清华大学", "中国顶级大学");
        OrganizationComponent college1 = new College("计算机学院", "计算机学院");
        OrganizationComponent college2 = new College("艺术学院", "艺术学院");
        OrganizationComponent department1 = new Department("软件工程", "软件工程");
        OrganizationComponent department2 = new Department("计算机科学与技术", "计算机科学与技术");
        OrganizationComponent department3 = new Department("舞蹈", "舞蹈");

        university.add(college1);
        university.add(college2);

        college1.add(department1);
        college1.add(department2);

        college2.add(department3);

        university.print();
    }
}
